count child elements javascript

83

count child elements javascript -

let temp = document.getElementById('element').parentNode;
console.log(temp.children.length);
// or the following
console.log(temp.childElementCount);

Comments

Submit
0 Comments